package com.zy.je.common.mybatis.ext.injector.util;

public enum ExSqlMethod {
    /**
     * 根据 id 查询数据，无视逻辑删除字段
     */
    SELECT_BY_ID_WITH_DELETED("selectByIdWithDeleted", "根据 id 查询数据，无视逻辑删除字段", "<script>\nSELECT %s FROM %s WHERE %s=#{%s}\n</script>"),
    /**
     * 根据ID删除数据，真实删除
     */
    REMOVE_REAL_BY_ID("removeRealById", "根据ID删除数据，真实删除", "<script>\nDELETE FROM %s WHERE %s=#{%s}\n</script>");

    private final String method;
    private final String desc;
    private final String sql;

    ExSqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }

    public String getSql() {
        return sql;
    }

}
